﻿using Furion.DependencyInjection;
using HYQY_Core.Entities.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HYQY_App.Login.Dtos
{
    /// <summary>
    /// 登录注册服务dto
    /// </summary>
    public class LoginDto
    {
        /// <summary>
        /// 邮箱-发件邮箱-输入
        /// </summary>
        public class SendEmailAsyncInput
        {
            /// <summary>
            /// 发件人账号
            /// </summary>
            public string AccountNumber { get; set; }

            /// <summary>
            /// 邮箱
            /// </summary>
            public string Email { get; set; }
        }


        /// <summary>
        /// 标准登录输出参数
        /// </summary>
        [SuppressSniffer]
        public class WebLoginResp : ResponseStatus
        {
            /// <summary>
            /// 权限组Id
            /// </summary>
            public string PermissionGroupId { get; set; }

            /// <summary>
            /// 用户id
            /// </summary>
            public string UserId { get; set; }

            /// <summary>
            /// 账号
            /// </summary>
            public string AccountNumber { get; set; }

            /// <summary>
            /// 用户昵称
            /// </summary>
            public string UserNick { get; set; }

            /// <summary>
            /// 数据权限
            /// </summary>
            public string DataPermissions { get; set; }

            /// <summary>
            /// 用户类型：
            /// 平台：0
            /// 个体：1
            /// 商家：2
            /// </summary>
            public int UserType { get; set; }

            /// <summary>
            /// 用户类型文本
            /// </summary>
            public string UserTypeText { get; set; }

            /// <summary>
            /// Token
            /// </summary>
            public string AccessToken { get; set; }

            /// <summary>
            /// 签发时间
            /// </summary>
            public DateTimeOffset SigninedTime { get; set; }

            /// <summary>
            /// 过期时间
            /// </summary>
            public long ExpiredTime { get; set; }

            /// <summary>
            /// 权限列表
            /// </summary>
            public List<string> PermissionList { get; set; }

            /// <summary>
            /// 上一次登录时间
            /// </summary>
            public string LastLoginTime { get; set; }

            /// <summary>
            /// 邮箱
            /// </summary>
            public string Email { get; set; }

            /// <summary>
            /// 头像路径
            /// </summary>
            public string HeadPortraitUrl { get; set; }

            /// <summary>
            /// 微信号
            /// </summary>
            public string WeChat { get; set; }

            /// <summary>
            /// 登录次数
            /// </summary>
            public int LoginCount { get; set; }

            /// <summary>
            /// 创建时间
            /// </summary>
            public DateTime? CreateTime { get; set; }
        }

        /// <summary>
        /// 注册输入
        /// </summary>
        public class RegisterIndexInput
        {
            /// <summary>
            /// 账号
            /// </summary>
            public string AccountNumber { get; set; }

            /// <summary>
            /// 密码
            /// </summary>
            public string Password { get; set; }

            /// <summary>
            /// 微信号
            /// </summary>
            public string WeChat { get; set; }

            /// <summary>
            /// 验证码
            /// </summary>
            public string VerificationCode { get; set; }

            /// <summary>
            /// 邮箱
            /// </summary>
            public string Email { get; set; }
        }

        /// <summary>
        /// 登录-输入
        /// </summary>
        public class LogInInput
        {
            /// <summary>
            /// 账号
            /// </summary>
            public string AccountNumber { get; set; }

            /// <summary>
            /// 密码
            /// </summary>
            public string Password { get; set; }

            /// <summary>
            /// 登录类型
            /// </summary>
            public int? UserType { get; set; }
        }

        /// <summary>
        /// 小程序登录响应参数
        /// </summary>
        public class AppletLoginResp :ResponseStatus
        {
            /// <summary>
            /// 用户名称
            /// </summary>
            public string UserName { get; set; }

            /// <summary>
            /// 用户头像路径
            /// </summary>
            public string AvatarUrl { get; set; }

            /// <summary>
            /// openid
            /// </summary>
            public string OpenId { get; set; }

            public string Session_key { get; set; }

            public string Token { get; set; }
        }

        /// <summary>
        /// 小程序用户授权登录-输入
        /// </summary>
        public class AppletLoginInput
        {
            /// <summary>
            /// 用户名称
            /// </summary>
            public string UserName { get; set; }

            /// <summary>
            /// 用户头像路径
            /// </summary>
            public string AvatarUrl { get; set; }

            /// <summary>
            /// openid
            /// </summary>
            public string OpenId { get; set; }

            public string Session_key { get; set; }
        }
    }
}
